package banking.domain;

import java.util.*; 
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import banking.domain.Customer;

public class Bank {
	public List<Customer>  customers;
	private static Bank bankInstance=new Bank();
	private Bank(){
		customers = new ArrayList<Customer>();
	}
	void addCustomer(String f,String l) {
			customers.add(new Customer(f,l));
	}
	public int getNumOfCustomers() {
		 	return customers.size();
	}
	public Customer getCustomer(int index) {
		 return customers.get(index);
	}
	public static Bank getBank() {
		return bankInstance;
	}
	public Iterator<Customer> getCustomers() {
			return customers.iterator();
	}
	public void sortCustomers() {
			Collections.sort(this.customers);
	}
}
